<%--
  Created by IntelliJ IDEA.
  User: WT-SUN
  Date: 2017/3/16
  Time: 8:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!doctype html>
<html lang="zh">
<head>
    <title>编辑菜单</title>
    <%@include file="/common/header.jspf" %>
    <script type="text/javascript">
        var useState = '${resource.useState}';
        var resType = '${resource.resType}';
        var resourceId = '${resource.id}';
    </script>
    <script type="text/javascript" src="${ctx}/resources/js/permission/resource/edit.js"></script>
</head>
<body>
<div class="form-wrap">
    <form id="resourceForm" method="post">
        <input type="hidden" id="id" name="id" value="${resource.id}"/>
        <div class="input-wrap">
            <label class="label-top">上级菜单:</label>
            <input class="text" type="text" name="parentId" id="parentResourceId" value="${resource.parentId}" style="width: 360px;"  title="" />

        </div>
        <div class="input-wrap">
            <label class="label-top">菜单名称:</label>
            <input class="easyui-textbox" type="text" name="name" value="${resource.name==null?"":resource.name}"
                   data-options="required:true">
        </div>
        <div class="input-wrap">
            <label class="label-top">菜单标识:</label>
            <input class="easyui-textbox" type="text" name="code" value="${resource.code==null?"":resource.code}"
                   data-options="required:true,editable:false">
        </div>
        <div class="input-wrap">
            <label class="label-top">菜单地址:</label>
            <input class="easyui-textbox" name="resUrl" value="${resource.resUrl==null?"":resource.resUrl}"
                   >
        </div>
        <div class="input-wrap">
            <label class="label-top">菜单类型:</label>
            <select class="easyui-combobox" name="resType" id="resType"
                    data-options="required:true,editable:false,selectOnNavigation:true">
                <option value="0">目录</option>
                <option value="1">菜单</option>
                <option value="2">按钮</option>
            </select>
        </div>
        <div class="input-wrap">
            <label class="label-top">按钮样式:</label>
            <input class="easyui-textbox" name="btnStyle" value="${resource.btnStyle==null?"":resource.btnStyle}">
        </div>
        <div class="input-wrap">
            <label class="label-top">启用状态:</label>
            <select class="easyui-combobox" name="useState" id="useState"
                    data-options="required:true,editable:false,selectOnNavigation:true">
                <option value="1">启用</option>
                <option value="0">未启用</option>
            </select>
        </div>
        <div class="input-wrap">
            <label class="label-top">排序数字:</label>
            <input class="easyui-numberspinner formInput"  value="${resource.sort==null?"":resource.sort}" name="sort">
        </div>
        <div class="input-wrap">
            <label class="label-top">备注:</label>
            <input class="easyui-textbox" type="text" name="remarks"
                   value="${resource.remarks==null?"":resource.remarks}" data-options="multiline:true">
        </div>
    </form>
    <div class="form-button">
        <a href="javascript:void(0)" onclick="submitForm()" class="easyui-linkbutton"
           data-options="iconCls:'fa fa-save fa-lg'">保存</a>
        <%--<a href="javascript:void(0)" onclick="clearForm()" class="easyui-linkbutton"
           data-options="iconCls:'fa fa-remove fa-lg'">清空</a>--%>
    </div>
</div>

</body>
</html>

